import Vue from 'vue'
import App from './App.vue'
import './plugins/element.js'
import router from './router'

import './style.css'

Vue.config.productionTip = false

import http from './http'

Vue.mixin({
  methods: {
    getAuthHeaders(){
      return {
        Authorization: `Bearer ${localStorage.token || ''}`,
      }
    },
  },
})

Vue.prototype.$http = http
Vue.prototype.assetsURL = process.env.VUE_APP_ASSETS_URL || '/admin/api/uploads'


new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
